package com.yuyou.fn.educational.service;

import com.github.wens.framework.service.ISuperService;
import com.github.wens.mybatisplus.plugins.Page;
import com.yuyou.fn.educational.entity.Student;
import com.yuyou.fn.educational.vo.StudentDetailVo;
import com.yuyou.fn.educational.vo.StudentImportVo;
import com.yuyou.fn.educational.vo.StudentSaveOrUpdateVo;

import java.util.List;

/**
 *@author  Terry
 * Student 表数据服务层接口
 *
 */
public interface IStudentService extends ISuperService<Student,Long> {


    Page<Student> findStudentByKeyword( String keyword, int pageNo , int pageSize);

     Long saveOrUpdateStudent(StudentSaveOrUpdateVo studentSaveOrUpdateVo);


    StudentDetailVo findStudentDetailByStudentId(Long studentId);

    String newStudentNo();

    /**
    *@Description: phoneNo 新增对slavePhoneNo的查询
    *@Param:
    *@return:
    *@Author: lzh
    *@date:
    */
    Student findByNameAndPhone(String name , String phoneNo );


    List<Student> findByPhone(String phones);

    void updateRegClassAmount(List<Long> studentIds);

    List<Student> findByStudentNos(List<String> studentNos);

    Student findByStudentNo(String studentNo);

    void importStudent(List<StudentImportVo> studentImportVoList,String from);

    Student findByCID(String cid);

    List<Student> findByCIDs(List<String> cids);

    void updateNameAndPhoneAndSlavePhoneByCid(String cid,String name,String phoneNo,String slavePhoneNo);

    void mergeStudentByOriginAndTargetStudentId(long originStudentId,long targetStudentId,String cid);

    Student findByPhoneNo(String phoneNo);

    List<Student> findByStudentNamesAndPhonesOrSlavePhones(List<String> studentNames,List<String> phoneNos,List<String> slavePhoneNos);

    List<Student> findStudentBySameName(long studentId);
}